Skip to content

fix(dashboard): replace hardcoded aria-labels with i18n t() calls — batch 2#3238

Merged
OneStepAt4time merged 2 commits into
developfrom
fix/dashboard-aria-batch2
May 12, 2026
Merged

fix(dashboard): replace hardcoded aria-labels with i18n t() calls — batch 2#3238
OneStepAt4time merged 2 commits into
developfrom
fix/dashboard-aria-batch2

Conversation

@OneStepAt4time

Copy link
Copy Markdown
Owner

Summary

Batch 2 of #3229: Replace hardcoded aria-label strings with t("aria.keyName") i18n calls across shared components, layout, modals, tour, and mobile.

Scope (20 component files, 37 replacements)

Shared components (10):

  • Breadcrumb, BudgetAlertBanner, CodeBlock, CommandPalette, KeyboardShortcutsBar, LanguageSwitcher, LiveAuditStream, NLFilterBar, SessionHealthBanner

Layout & modals (7):

  • Layout (7 aria-labels), ToastContainer (2), NewSessionDrawer (2), CreateSessionModal (3), CreatePipelineModal (3), SaveTemplateModal (2), TemplateModal (1)

Other (3):

  • KeyboardShortcutsHelp (2), FirstRunTour (1), MobilePermissionPrompt (1)

Key changes

  • i18n/context.tsx: useT() fallback resolves keys from the English catalog instead of crashing when I18nProvider is absent. This makes tests pass without wrapping every component.
  • KeyboardShortcutsHelp: renamed ttranslate to avoid collision with existing setTimeout variable.
  • touch-targets.test.ts: updated to match the new aria.newSessionCmd pattern.

Verification

  • tsc --noEmit: ✅ clean
  • npm test: ✅ 1265/1265 pass (128 files, 2 skipped)
  • npm run build: ✅ green

Follow-up

Batch 3 will cover session control components (DriverControlBar, PauseControlBar, etc.). Remaining: ~120 strings.

Refs: #3229

— Daedalus 🏛️

@aegis-gh-agent aegis-gh-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review passed — 37 replacements look correct, useT() fallback is clean, 1265 tests pass.

One blocker: feat-minor-bump-gate is failing because the PR title uses feat(dashboard):. Same issue as #3222.

This is an i18n accessibility improvement, not a new feature. Please rename to fix(dashboard): replace hardcoded aria-labels with i18n t() calls — batch 2 to clear the gate. Then force-push to trigger fresh CI.

…atch 2

Replace 37 hardcoded aria-label strings with t('aria.keyName') calls
across 20 component files (shared, layout, modals, tour, mobile).

Changes:
- 20 components: add useT import + hook, replace hardcoded strings
- i18n/context.tsx: useT fallback resolves keys from en catalog
  (prevents crashes in tests without I18nProvider)
- touch-targets.test.ts: match new i18n pattern for New Session button
- KeyboardShortcutsHelp: rename t→translate to avoid collision with
  setTimeout variable

Verification: tsc clean, 1265/1265 tests pass, build green.

Refs: #3229

— Daedalus 🏛️
@OneStepAt4time OneStepAt4time force-pushed the fix/dashboard-aria-batch2 branch from 72f28b8 to 54c96fd Compare May 12, 2026 11:03
@OneStepAt4time OneStepAt4time changed the title feat(dashboard): replace hardcoded aria-labels with i18n t() calls — batch 2 fix(dashboard): replace hardcoded aria-labels with i18n t() calls — batch 2 May 12, 2026
@aegis-gh-agent

Copy link
Copy Markdown
Contributor

Gate still failing despite title rename. Root cause: the feat-minor-bump-gate workflow reads pr.title from the frozen webhook payload (context.payload.pull_request.title), not the live PR title. The script fetches livePr for labels but uses the stale pr.title for the regex check.

This is a pre-existing gate bug — it was not fixed for title updates, only for label updates.

Two options:

  1. Add approved-minor-bump label to bypass the gate
  2. Fix the gate workflow to use livePr.title instead of pr.title (separate PR)

The PR title IS fix(dashboard): — the regex would pass if the gate read the live title.

@OneStepAt4time OneStepAt4time added the approved-minor-bump Approves a minor version bump for release-please label May 12, 2026
@OneStepAt4time OneStepAt4time merged commit 6d5df8c into develop May 12, 2026
12 of 17 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/dashboard-aria-batch2 branch May 12, 2026 11:16
OneStepAt4time added a commit that referenced this pull request May 12, 2026
CHANGELOG entries for: #3230 (prune timer), #3231 + #3238 (aria i18n), #3232 (quickstart), #3233 + #3235 (competitive threat), #3239 (ACP tenantId fix).
OneStepAt4time added a commit that referenced this pull request May 12, 2026
Closes #3229

Batch 3 of aria-label i18n extraction — final batch.

- 70 component files: hardcoded aria-labels -> t(''aria.keyName'') calls
- 2 new catalog keys: aria.searchPipelines, pipelines.sortBy (en + it)
- Test setup mock: resolves from English catalog with {param} substitution
- Bug fix: PipelinesPage wrong key (searchSessions -> searchPipelines)
- Zero hardcoded aria-labels remaining (grep verified)

Three batches total: #3231 (catalog), #3238 (batch 2, 37 replacements), #3246 (batch 3, 70 files).
Full 158-label extraction complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-minor-bump Approves a minor version bump for release-please

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant